home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.2 Development Libraries / SGI IRIX 6.2 Development Libraries.iso / dist / gl_dev.idb / usr / share / src / OpenGL / demos / stonehenge / Telescope.h.z / Telescope.h
Encoding:
C/C++ Source or Header  |  1996-03-15  |  962 b   |  42 lines

  1. #ifndef TELESCOPE_H
  2. #define TELESCOPE_H
  3.  
  4. class Telescope {
  5.  public:
  6.   Telescope(GLfloat x = 0, GLfloat y = 0);
  7.   ~Telescope();
  8.  
  9.   /* This draws the "outside" of the telescope - the fov and aspect are
  10.    * needed since it is drawn in eye coordinates */
  11.   void draw_setup(GLfloat fov, GLfloat aspect = 1.0, int perspective = 1);
  12.   void draw_fake();
  13.   void draw_body();
  14.   void draw_takedown();
  15.   
  16.   /* This just draws the lens - usually it will be used to draw the lens
  17.    * into the stencil buffer */
  18.   void draw_lens();
  19.  
  20.   /* How finally to divide things as we're drawing */
  21.   void set_divisions(int d);
  22.   int get_divisions();
  23.  
  24.   /* This is the radius of the lens - the rest of the dimensions depend
  25.    * upon it */
  26.   void set_radius(GLfloat r);
  27.   GLfloat get_radius();
  28.  
  29.   /* Positions are in eye coordinates and go from [0, 1] */
  30.   GLfloat xpos, ypos;
  31.  private:
  32.   int divisions;
  33.  
  34.   GLfloat radius; 
  35.  
  36.   GLUquadricObj *disk;
  37.   GLUquadricObj *cylinder;
  38. };
  39.  
  40. #endif
  41.  
  42.